package com.tiancheng.trade.commom.core.exception.error;

import com.tiancheng.trade.commom.core.exception.assertion.BusinessExceptionAssert;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 认证相关
 *
 * @author kellen
 * @date 2024/10/21
 */
@Getter
@AllArgsConstructor
public enum AuthErrorInfoEnum implements BusinessExceptionAssert {

    USER_USER_IS_DISABLED(7000, "账号异常，用户已冻结"),
    USER_PWD_CHECK_ERROR(7001, "用户密码校验失败"),
    AUTH_PWD_HAS_EXPIRED(7002, "用户密码已过期"),
    AUTH_ACCOUNT_IS_LOCK_BY_PW_ERROR(7003, "错误次数过多，账号已锁定！"),
    AUTH_USER_PWD_IS_ERROR(7004, "登录失败，密码错误！"),
    AUTH_UN_SUPPORT_LOGIN_METHOD_ERROR(7005, "登录失败，不支持的登录方式！"),
    AUTH_PWD_NULL_ERROR(7007, "登录失败，用户密码为空！"),
    AUTH_PHONE_AND_EMAIL_BOTH_IS_NULL(7008, "登录失败，手机和邮箱不能同时为空！"),
    AUTH_USER_ACCOUNT_DOES_NOT_EXIST(7009, "登录失败，用户账号不存在！"),
    AUTH_NO_SIGN_IN_ERROR_CODE(7010, "登录失败，用户账号不存在！"),
    AUTH_APPLICATION_APPLICATION_NOT_FOUND(7011, "登录失败，未查询到应用！"),


    //--------账号注册
    AUTH_ACCOUNT_REGISTER_UN_SUPPORT(7100, "注册失败，不支持的注册类型！"),
    AUTH_ACCOUNT_REGISTER_USERNAME_NOT_NULL(7101, "注册失败，用户名、密码不能为空！"),
    AUTH_ACCOUNT_REGISTER_PHONE_CODE_NOT_NULL(7102, "注册失败，手机号、验证码不能为空！"),
    AUTH_ACCOUNT_REGISTER_NO_PERMISSION(7103, "您无权进行该操作！"),


    AUTH_ERROR(7777,"认证失败！"),
    AUTH_TOKEN_ERROR(403,"登录失效，请重新登录！");
    ;


    /**
     * 返回码
     */
    private int code;
    /**
     * 返回消息
     */
    private String message;
}
